package com.emre.daoGenerator.utils;

import com.emre.daoGenerator.oracleObject.OracleDataType;

public class DataTypeMethodMapper 
{
	public static String mapDataTypeToWriteMethodName(OracleDataType type)
	{
		if(type == OracleDataType.NUMBER)
			return "writeLong";
		else if(type == OracleDataType.VARCHAR2)
			return "writeString";
		else if(type == OracleDataType.TIMESTAMP)
			return "writeTimestamp";
		return null;
	}
	
	public static String mapDataTypeToGetMethodName(OracleDataType type)
	{
		if(type == OracleDataType.NUMBER)
			return "getLong";
		else if(type == OracleDataType.VARCHAR2)
			return "getString";
		else if(type == OracleDataType.TIMESTAMP)
			return "getTimestamp";
		return null;
	}
	
	public static String mapOracleDataTypeToJavaType(OracleDataType type)
	{
		if(type == OracleDataType.NUMBER)
			return "Long";
		else if(type == OracleDataType.VARCHAR2)
			return "String";
		else if(type == OracleDataType.TIMESTAMP)
			return "Timestamp";
		return null;
	}
}
